#ifndef CONSOLE_APPENDER_H
#define CONSOLE_APPENDER_H

#include "../log_config.h"
#include "log_message_block.h"
#include "./console_appender_config.h"
#include <iostream>
namespace vpm
{
	namespace log 
	{
		namespace detail
		{
			class ConsoleAppender : public LogAppender
			{
			public:
				ConsoleAppender(boost::shared_ptr<ConsoleAppenderConfig > cfg )
                    :LogAppender(cfg, LogConfig::LOGGER_CONSOLE|LogConfig::LOGGER_COUT)
				{
                    m_consoleAppenderConfig = cfg; 
				}

				virtual ~ConsoleAppender()
				{
				}

				virtual void do_append(LogMessageBlock * pLogMsg)
				{
					//std::copy(pLogMsg->begin(),pLogMsg->end(),std::ostream_iterator<char>(std::cout));		
					std::copy(pLogMsg->begin(),pLogMsg->end() ,std::ostream_iterator<char>(std::cout));		
				}

            private:
                boost::shared_ptr<ConsoleAppenderConfig> m_consoleAppenderConfig; 
			};
		}
	}
}

#endif // 
